package leetcode_301_400;

public class LeeCode_392 {
    public static void main(String[] args) {

    }
    private static boolean isSubsequence(String s, String t) {
        int index = 0;
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            boolean flag = false;
            for (int j = index; j < t.length(); j++) {
                char c2 = t.charAt(j);
                if (c2 == c){
                    index = j + 1;
                    flag = true;
                    break;
                }
            }
            if (!flag){
                return false;
            }
        }
        return true;
    }
}
